package com.cxm.server.utils;

import com.cxm.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * 操作员工具类
 *
 * @author cxm
 */
public class AdminUtil {

    /**
     * 获取当前操作员
     * @return
     */
    public static Admin getCurrentAdmin(){
        return ((Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }
}
